<template>
  <div v-loading="loading">
    <div class="bg_div">
      <el-form
        ref="newRequired"
        class="demo-ruleForm"
      >
        <!-- :rules="rules" -->
        <el-row style="margin-top: 20px">
          <el-col class="hang">
            <div style="width: 150px; height: 100%" class="hang">
              <span style="color: red">* </span>
              <span>选择公司：</span>
            </div>
            <el-select
              class="disactive2"
              style="width: 220px"
              v-model="selectCompany"
              @change="companyChange"
            >
              <el-option
                v-for="(item, index) in selectHang"
                :key="index"
                :label="item.text"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row style="margin-top: 20px">
          <el-col class="hang">
            <div style="width: 150px; height: 100%" class="hang">
              <span style="color: red">* </span>
              <span>超华：</span>
            </div>
            <el-form-item class="hang" style="width: 220px">
              <el-input
                placeholder="请输入"
                class="hang"
                style="width: 220px"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="margin-top: 20px">
          <el-col class="hang">
            <div style="width: 150px; height: 100%" class="hang">
              <span style="color: red">* </span>
              <span>总浓度 mg/m³：</span>
            </div>
            <el-form-item class="hang" style="width: 220px">
              <el-input placeholder="请输入" class="hang" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="margin-top: 20px">
          <el-col class="hang">
            <div style="width: 150px; height: 100%" class="hang">
              <span style="color: red">* </span>
              <span>主成份热值:</span>
            </div>
            <el-form-item class="hang" style="width: 220px">
              <el-input placeholder="请输入" class="hang" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>

    <!--操作按钮-->
    <div class="button-box">
      <el-button type="primary" class="save">保存</el-button>
      <el-button type="primary" class="save"
        >确认提交</el-button
      >
    </div>
  </div>
</template>

<script>
export default {
  name: "RequiredSelect",
  data() {
    return {
      selectCompany: 2,
      selectHang: [
        { value: 1, text: "鹏诚合同" },
        { value: 2, text: "超华合同" },
      ],
      loading: false,
    };
  },
  beforeMount() {},
  methods: {
    //选择行业
    companyChange() {
      this.$emit("companyChange", this.selectCompany);
    },
    //保存
    saveBtn() {},
  },
};
</script>

<style lang="scss" scoped>
.bg_div {
  padding: 40px 40px;
  margin: 10px 0px;
  border-radius: 5px;
}

.tableTitle {
  display: flex;
  align-items: center;
}

.bgBlue {
  width: 3px;
  height: 20px;
  background-color: #3276fb;
  border-radius: 3px;
  margin-right: 10px;
}

.title {
  font-size: 16px;
  font-weight: 500;
}

.el-form-item__label {
  display: none;
  width: 0px !important;
}

.el-form-item__content {
  margin-left: 3px !important;
  margin-right: 3px !important;
}

.el-form-item {
  display: inline-block !important;
  margin-bottom: 0 !important;
}

.el-form-row-wrapper {
  .el-form-item__content {
    width: 85px;
  }
}

.el-row {
  display: flex;
}

.content {
  width: 200px;
  font-size: 13px;
  background-color: aliceblue;
}

.hang {
  display: flex;
  align-items: center;
  justify-content: center;
}

.buttonblue {
  flex: 1;
  padding: 10px;
  background: #2f86ff;
  border-radius: 4px;
  cursor: pointer;
  color: #ffffff;
  margin-top: 50px;
}
::v-deep .disActive2 {
  height: 30px;
  font-size: 13px;
  border: none;
  border-radius: 5px;
  background-color: #f8f8f8;
  padding: 1px;
  .el-input__inner {
    height: 30px;
    font-size: 13px;
    border: none;
    border-radius: 5px;
    background-color: #f8f8f8;
    padding: 1px;
  }
  /* 下面设置右侧按钮居中 */
  .el-input__suffix {
    top: 5px;
  }
  .el-input__icon {
    line-height: inherit;
  }
  .el-input__suffix-inner {
    display: inline-block;
  }
}

.button-box {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
  div {
    width: 100px;
    padding: 10px;
    background: #2f86ff;
    margin: 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #ffffff;
  }
  .save {
    padding: 15px 20px;
    margin: 10px;
  }
}
</style>